<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <title>标签用户</title>
    <%@ include file="../common/meta.jsp" %>
    <link href="${ctx}/css/page/common-list.css?t=${now}" rel="stylesheet">
    <link href="${ctx}/css/page/common-search.css?t=${now}" rel="stylesheet">
    <style>
    </style>
    <script>
        var statusMap = ${statusMap};
        var searchInfo = ${searchInfo};
    </script>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5><i class="fa fa-search"></i> 筛选查询</h5>
                </div>
                <div class="ibox-content ibox-content-search">
                    <form class="form-horizontal m-t" id="searchForm" novalidate="novalidate">
                        <div class="form-group">
                            <label class="col-sm-1 control-label">标签用户：</label>
                            <div class="col-sm-5">
                                <input type="text" name="groupTag" onkeydown="if(event.keyCode==13){doRefresh();return false;}"
                                       value="${not empty searchInfo ? searchInfo.groupTag : ''}"
                                       id="groupTag" class="form-control"  placeholder="输入标签名称" maxlength="30">
                            </div>
                            <label class="col-sm-1 control-label">有效性：</label>
                            <div class="col-sm-2">
                                <select class="form-control" name="status" id="status" onchange="doRefresh()">
                                    <option value="">--请选择--</option>
                                    <c:forEach items="${statusMap}" var="item">
                                        <c:if test="${item.key != 'delete'}">
                                            <option value="${item.key}" ${not empty searchInfo && searchInfo.status == item.key ? 'selected' : ''} >${item.value}</option>
                                        </c:if>
                                    </c:forEach>
                                </select>
                            </div>
                            <div class="ibox-tools ibox-tools-search">
                                <button type="button" class="btn btn-primary btn-outline" onclick="doRefresh()">查询</button>
                                <button type="reset" class="btn btn-primary btn-outline">重置</button>
                                <button type="button" class="btn btn-primary btn-outline" onclick="openSearchTools();"><i class="fa fa-caret-down"></i></button>
                            </div>
                        </div>
                        <div class="search-tools">
                            <div class="form-group">
                                <label class="col-sm-1 control-label">打标状态：</label>
                                <div class="col-sm-2">
                                    <select class="form-control" name="dataStatus" id="dataStatus" onchange="doRefresh()">
                                        <option value="">--请选择--</option>
                                        <option value="Y" ${not empty searchInfo && searchInfo.dataStatus == 'Y' ? 'selected' : ''} >确认</option>
                                        <option value="N" ${not empty searchInfo && searchInfo.dataStatus == 'N' ? 'selected' : ''} >疑似</option>
                                    </select>
                                </div>
                                <label class="col-sm-1 control-label">打标时间：</label>
                                <div class="col-sm-2">
                                    <input placeholder="打标时间" class="form-control layer-date" id="beginTimeStr" name="beginTimeStr" value="${not empty searchInfo ? searchInfo.beginTimeStr : ''}">
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5><i class="fa fa-table"></i> 标签用户信息</h5>
                    <div class="ibox-tools col-sm-offset-2">
                        <button class="btn btn-primary btn-outline" onclick="doRefresh()">刷新</button>
                        <c:if test="${userType == 'super' || not empty btnMap['exportGroup']}">
                            <button class="btn btn-primary btn-outline" onclick="doExport()">导出</button>
                        </c:if>
                    </div>
                </div>
                <div class="ibox-content">
                    <table class='table table-striped table-hover'
                           id="dataTable" data-height="400"
                           data-toggle="table"
                           data-url="${ctx}/bizUserDataGroup/pageFindUserDataGroupData?t=${now}"
                           data-pagination="true"
                           data-side-pagination="server"
                           data-striped="true"
                           data-response-handler="handleServerResult"
                           data-query-params-type=""
                           data-query-params="getParams"
                           data-page-number="${not empty searchInfo.pageNo ? searchInfo.pageNo : 1}"
                           data-page-size="${not empty searchInfo.pageSize ? searchInfo.pageSize : defaultPageSize}"
                           data-page-list="${pageList}">
                        <thead>
                        <tr>
                            <th data-field="id" data-visible="false">标签记录ID</th>
                            <th data-field="status" data-formatter="formatStatus" data-align="center" data-width="100px">标签有效性</th>
                            <th data-field="userId" data-align="center" data-width="140px">用户ID</th>
                            <th data-field="tagId" data-align="center" data-width="120px">标签ID</th>
                            <th data-field="groupTag" data-formatter="formatName" data-events="actionEvents" data-align="center">标签名称</th>
                            <th data-field="dataStatus" data-align="center" data-width="120px">打标状态</th>
                            <th data-field="gmtCreate" data-align="center" data-width="140px">打标时间</th>
                            <th data-field="tagDesc" data-align="center" data-width="200px">打标说明</th>
                        </tr>
                        </thead>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-sm-12">
            <div class="text-center">${companyName}</div>
        </div>
    </div>
</div>

<script src="${ctx}/js/user/userDataGroupMgr.js?t=${now}"></script>
</body>
</html>

